<include file="Public/header" title="验证邮箱-机构注册" />

<div class="main">
    <div class="wrap">
        <ul class="nav-bar">
            <li class="step"><span>基本信息</span><i></i></li>
            <li class="active"><span>验证邮箱</span><i></i></li>
            <li><span>信息登记</span><i></i></li>
            <li><span>账号信息</span><i></i></li>
        </ul>
        <div class="content">
            <div>
            <?php
                if(isset($message)) {
                    echo($message);
                }else{
                    echo($error);
                }
            ?>
            </div>
            <?php if(isset($message)) { ?>
            <p class="jump">
                页面将在 <b id="wait"><?php echo($waitSecond); ?></b> 自动跳转，如果没有跳转，请<a id="href" href="<?php echo($jumpUrl); ?>">点击此处</a>!
            </p>
            <script type="text/javascript">
                (function(){
                    var wait = document.getElementById('wait'),href = document.getElementById('href').href;
                    var interval = setInterval(function(){
                        var time = --wait.innerHTML;
                        if(time <= 0) {
                            location.href = href;
                            clearInterval(interval);
                        };
                    }, 1000);
                })();
            </script>
            <?php } ?>
            <?php if(isset($error) && $error=='此链接已经失效') { ?>
            <p class="jump">
                点击 <a href="javascript:;" id="sendEmail">重新发送验证邮件</a>
            </p>
            <script type="text/javascript">
                $("#sendEmail").click(function(){
                    $.getJSON("{:U('reSendEmail')}",{hash:'<?php echo $_GET['hash']; ?>'},function(data){
                        alert(data.info);
                    })
                })
            </script>
            <?php } ?>
        </div>
    </div>
</div>
<include file="Public/footer" />